<%-- 
    Document   : cambiarCarrera
    Created on : 08-16-2012, 09:27:21 PM
    Author     : Susy
--%>

<%@include file="/include/header.jsp" %>
<%@include file="/include/headerBec.jsp" %>
<script type="text/javascript">
      function cargarCarreras(){
        var form = document.getElementById("carreraForm");
        form.cmd.value = "addCarrera";
        form.submit();
    }
</script>
<div class="content">
    <html:form action="/Carrera" styleId="carreraForm" >
         <html:hidden property="cmd" value="cambiar" />
         <table border="0" class="form">
             <caption class="titleSeg">Cambio de Carrera</caption>
              <tr class="campos">
                    <td class="label">Universidad:&nbsp;&nbsp;</td>
                    <td class="control">
                        <html:select property="codUniversidad" styleClass="tinput178" onchange="cargarCarreras();">
                            <html:option value="">---Seleccione---</html:option>
                            <html:options collection="UniversidadesList" property="idUniv"
                                        labelProperty="nombre" labelName="nombre" ></html:options>
                        </html:select>
                    </td>
                    <td width="20px"></td>
                    <td class="label"> Carreras:&nbsp;&nbsp;</td>
                    <td class="control">
                        <html:select property="codCarrera" styleClass="tinput178">
                            <html:option value="">---Seleccione---</html:option>
                            <html:options collection="CarrerasList" property="id.codCarrera"
                                        labelProperty="carrera" labelName="carrera" ></html:options>
                        </html:select>
                    </td>
            </tr>
            <tr>
                    <td colspan="5" align="center">
                        <html:submit value="Cambiar Carrera" styleClass="button" />
                    </td>
            </tr>
         </table>
    </html:form>
    <logic:present name="cxbList" scope="request">
            <display:table pagesize="10" name="cxbList" requestURI="" class="results" style="width:90%;" id="results">
                <display:column property="carrera.universidad.nombre" title="Universidad" sortable="true" />
                <display:column property="carrera.carrera" title="Carrera" sortable="true" />
                <display:column property="estadoFull" title="Estado" sortable="true" />
                <display:column property="fechaInicioS" title="Fecha Inicio" sortable="true" />
                <display:column property="fechaFinS" title="Fecha Fin" sortable="true" />
            </display:table>
        </logic:present>
        <script>
            var table = document.getElementById("results");
            var rows = table.getElementsByTagName("tr");
            for (var i = 1; i < rows.length; i++) {
                rows[i].onmouseover = function() {
                    this.className += ' hilite';
                }
                rows[i].onmouseout = function() {
                    this.className = this.className.replace(' hilite', '');
                }
            }
        </script>
</div>
<%@include file="/include/footerBec.jsp" %>
<%@include file="/include/footer.jsp" %>